package presenter.page;

import main.InputBean;
import main.InputMode;
import utils.OnLogListener;

public class JFramePage extends BasePage {
    private final String tip;

    public JFramePage(String tip) {
        this.tip = tip;
        showTip(tip);
    }

    @Override
    protected void action(String input) {
        InputBean info = InputBean.parse(input);
        InputMode.action(tip, info, new OnLogListener() {
            @Override
            public void log(String content) {
                JFramePage.this.log(content);
            }

            @Override
            public void taskFinish() {
                JFramePage.this.log("任务结束！！！！");
            }
        });
    }

    @Override
    protected String title() {
        return "工具小集合";
    }
}
